* (bug 2178) Fix temp dir check again
* (bug 2488) Format 'deletedtext' message as wikitext
* (bug 750) Keep line endings consistent in LocalSettings.php
+* (bug 1577) Add 'printable version' tab in MonoBook for people who don't
+ realize you can just hit print to get a nicely formatted printable page.
=== Caveats ===
$tpl->setRef( 'wgScript', $wgScript );
$tpl->setRef( 'skinname', $this->skinname );
$tpl->setRef( 'stylename', $this->stylename );
+ $tpl->set( 'printable', $wgRequest->getBool( 'printable' ) );
$tpl->setRef( 'loggedin', $this->loggedin );
$tpl->set('nsclass', 'ns-'.$this->mTitle->getNamespace());
$tpl->set('notspecialpage', $this->mTitle->getNamespace() != NS_SPECIAL);
);
$vcount ++;
}
- }
+ }
+
+ // A print stylesheet is attached to all pages, but nobody ever
+ // figures that out. :) Add a link...
+ if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) {
+ $content_actions['print'] = array(
+ 'class' => false,
+ 'text' => wfMsg( 'printableversion' ),
+ 'href' => $wgRequest->appendQuery( 'printable=yes' ) );
+ }
wfProfileOut( $fname );
return $content_actions;
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css"; /*]]>*/</style>
- <link rel="stylesheet" type="text/css" media="print" href="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
+ <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
<!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]-->